package tests;

import common.Utils;
import org.openqa.selenium.By;

//博客详情界面
public class DetailPage extends Utils {

    public static String url = "http://127.0.0.1:8080/blog_detail.html";

    public DetailPage() {
        super(url);
    }

    public void DetailSuc() throws InterruptedException {
        driver.get("http://127.0.0.1:8080/blog_login.html");
        driver.findElement(By.cssSelector("#username")).sendKeys("zhangsan");
        driver.findElement(By.cssSelector("#password")).sendKeys("123456");
        driver.findElement(By.cssSelector("body > div.container > div.right > div:nth-child(1) > a")).click(); //点击 查看详情 按钮
        Thread.sleep(100);
        driver.findElement(By.cssSelector("body > div.container > div.right > div > div.date")); //能找到时间就说明能成功查看详情

    }
}
